fix the targetHeight calc error