fixed the missing bitmasking of the shifted value