Fixed various small problems