got rid of mysql.end(), but still doesnt work..