fixing some issues with promises