Small bug fix with test