added buf fix with category