don't resolve promises twice