Fix the current_app declaration to be externed