Fixed another bug related to models