better solution for 1.7 file compatibility than pull request 471