fix check for existing bugs & also import resolution

Change-Id: Ibaa9c17330695da90fdff23b266e998e2250478e