Fix 2 minor bugs