Fix for SQLITE error