How about the approach I have used now? Should be more _stable_ =)