jkn is right that this is a terrible way of fixing it... but also the whole proc this is a part of is so mindblowingly awful and non-object oriented that you would basically have to start rewriting it all and we can't really make you do that