Fixed crash on invoke_msg_rect