Fixed some bugs for plugin imageinput.js.