Fixing mysql problem