added length checking to Update in MessageHandler