Fixes to avoid extra setTimout in Promises