Some fixes in model code