The previous fixes to highlighting caused no highlight to occur sometimes