Fixed bug in adding transaction