Reverting to Rui's last version, as it actually works both in Darwin and in Linux