fix case where resume could be called twice