fixes for Duplicate transaction function