Fixed: typo in device's 'all' request
Fixed: in certain cases (replication), doc could be undefined resulting to a crash of the application