Fixed some major bugs with MySQL callback