fixes the infamous Database Locked sqlite issue