Fixed trailing zeroes
Fixed several problems related to resigning