fix query image bug and clip image bug