fixing react error