Fixed deprecation warnings
This resulted in adding a new dependency unfortunatly.