clean up promise detection