Fix small bug noticed on code review