added sort of like else statement if the each fails for hbs and corrected syntax for companycategoriesviewjs