Some minor bugs fixed.