[fix] avoid fatal error while viewing a category