fixed issue #26; wrong variable being used for mysql checks