Changed to work with unsigned short labels