fix code after connecting to NAS device