fixes for sqlite