patch to work with reactjs