Fix error on resume