Various fixes (bad commit, sorry)