Making a few changes to be compatible with the new mysql module