Added database flush to make sure current_project is recognized