Fixes bug discovered in code review.