More robust version handling