The changes fixes such it work with 1.0

Its also back compatible.
Merge pull request #1988 from s093294/patch-1

The changes fixes such it work with 1.0