Bug fix in facts module, and fix in mysql module to check if connection is alive before querying, if not, reconnect and query.