SQLite - fixed exec function