Update 4

Some minor fixes, and fixed implementation for multi-channel images