further rb299 changes

As discussed,
  I've made some further changes in this area.

It does work in RB2.99 - its not "elegant" in its implementation but I've no other ideas how to implement this.