minor bugs  fixed