Fix some type inference problems
Add a very simple imresize