Fixed issue when starting from an empty database. Also fixed carb and insulin saving.