modeldict fixes and tests