fixed #12, improved security