Fixed issue #2035. Improved also execution in one transaction rather than multiple ones