Fix some issues for new version of Cowboy