fixed multiple issues for getting mysql / postgres support on an equal level