fix bad token crash