As far as I see thats the only good way to deal with this issue. Current solution looks good to me.