Append a protocol if its missing.

Fixes #2242 
A failure block is optional, so if we check for both then the return statement would not be executed if a failure block was not passed.