fixed an error message and made it search by id