New version compatibility

Fixes issues with new version while keeping backwards compatibility.