Improved the version handler