Replaced tmp with global version variable.