Removing minor bugs