Fixing bits after introduction of sql