Fixed some deprecation warnings

According to https://github.com/senchalabs/connect/wiki/Connect-3.0