some fixes to new changes in cowboy