Fixes minor bugs