Add a check to avoid sending sync messages while handling async messages