fix type assertion of message number