Fixed bug that alter_response is not binary safe