Some fixes to small problems