Fix problems with channel upgrade handler