Fixed a bug in the previous fix
Additional protection against malformed input data to the Hub