fixing bug with componentWillRevieveProps