Fix for calculating signature

The calculation of the signature was not correct when using ' in the fields that are used for calculating th signature