Fixed resume bug