fix a bug when token length not 4