fixing reactjs problem