fixes minor bugs