fixed bug in creating signature