Fix bug in version comparison