Fixing a bug in recording API dependencies in DB