fixed NPE MySQLcore (fixes #542)