Else if to fix racetask bug