added promise unresolved check