Fixed 32 bit shift and sign_extension errors