some minor bugs resolved