fixed mysql bug