Explicitly set cast to avoid deprecation warnings
Merge pull request #230 from projecthydra/avoid_deprecation

Avoid deprecation