fixed bug in getSerialNumber