minor bugs fixed.