Improved version handling