fix handling of invalid request data