Fixed checking for command and execution
Fixed rights
Merge branch 'hotfix-gen_patches'