Fix issue #833

The reason for this bug is a missing bang (!) in the last gsub call.