Quicker database saving. Removed unneeded inDatabase check