Fixed task#then to return promise instead of task. Fixed IE bugs.