Fix resume bug