Revert "Latest fixes"

This reverts commit 33a4528310ef5b89852cd3ed8ce10526e2103412.