fix handle_whitespace method to increment line index number.