fix issue where dismiss is being shown too often