added optional sqlite fields handling