Renetered the version selector and added some error code