fix compatibility for 2.6 and lower version