Fixed sqlite error