Fix deprecation warnings

closes #526. It is still unclear whether tests fail because there is a bug or because they are too stringent