Fix MySQL issues