added code to deal with mariasql always returning strings