fix encoding issue for failsafe plugin