Fixed deprecations caused by #166.