Fixing #545 and 586, remove the escreening from the sql script as it does not work in test