fix for NA category data