Fixed bug in model.img mask