fixing errors with ajax categories