Browser hangs when parent = state

It was a dumb mistake, but if you set parent state equal to current state the browser hangs and then crashes. This is a simple check to prevent that.