fixing transaction generation bug