Fixed sending of variables to mySQL