Improved the error message for incompatible protocol versions

#1176