Fix some bugs involving calling .then methods.
Fix Loader.prototype.module up to current gist.