Added MYSQL fail safes