webserver: Fixes for encoding