I've changed this to use `where` instead of `find`, so the issue of invalid IDs is no longer a problem.