bugfix in then callback for right context