dirty bugfix for MySQL behaving oddly