Fixed issue with fetching the correct set of defects