Use the correct error serializer

My fix for #167