Model bug fixes