Fixed bug with Stats in MySQL