improved handling of resume