Bug fix on input upload