Fixes issues caused by React v0.12 changes