Added fix for mysql commands out of sync error.