Adding check for code length > 3, now truncates