fix problems for mysql