Fix method_exists bug