Bug fix for creating transactions