compatibility with react 0.12

two warnings fixed