Some essential fixes