Fix double comparison issues.