Fixed rescue_from in api_master