fix issue mentioned in https://spark.desk.com/agent/case/16231