Remove debug messages
Fix promises resolution