Fix typehinting which needs to be more flexible.
Merge branch 'develop'