fix the undefined error due to ssl