fixed memory bug and saltless bug