Removed minor bugs