Fixed error with processing multiple messages