bugfix for mysql