fixed sign-extend issue