fix numberOfLines check