Fixing sql-buffer behaviour.