Some fixes to model

Change-Id: Ied6d11f42b57b5b91fb66b841e39867592316a31