fixed tests and bug with using password file