Fixing other minor bugs