fixing style, removed duplicate $apply