solved a bug when not secure