FIX minor bugs