now correctly handle non existant id