fix pending method

I came across same issue as in #219, so here fix and tests