error check on categories