Fix bug in 2.7 version