More tweaks, still doesn't work satisfactorily though