please add a comment explaining why this `if`, I spent a few minutes trying to understand this.