Fix Promise implementation to pass Promises/A+ tests