Fixed MyISAM functionality

Someone uses it so I tested it a bit, some really dumb things are now fixed there.