Updated version checking to work with varying lengths.