Fix undefined variable called 'parent'
Merge pull request #10 from deris/fixed/undefined_variable

Fix undefined variable called 'parent'