Fix security
Old work
Merged bug_57
bug_58
Merge pull request #1 from noppe/bug_58

Bug 58