some minor bugs fixed...