models fixed, bug fixes