fixes image order bug in ng-model