fixed toggling issue with angular