solved a minor bugs