Added some secure fixes