fix function_exists() check
fix empty line filtering