Bug fixes on remote task running.