Fixed getByid to handle string and actual ids