Replacing global calls and use functions see BT#7682