Fix creation of guards.
Merge pull request #170 from gmist/fix_guards_create

Fix guards creation