fixes to msql classes