Fix for some failing unit test on SQL