Some minor bugs