Another (hopefully more robust) attempt to find a usable substitute