fix a bug of calculating shift_val