Fix error checking in the citeulike code.