storing models fix - last optimization broke it