fix the wrong usage of crypto