Fix token size calculations