fix for RenderState::currentState