fix resetState