fix casting for HTTP port