Fixed a security issue in the code