Fixed broken function in message receiver