This is not a problem, it's the correct behavior. It is natural that a (EDIT)unsigned 16-bit variable becomes 0 when it is shifted by 16 bits.