Python 3 fix for the bottle handler.