fix 2 minor bugs