Fixed segfault when trying to pick up non-existing objects