Fixing reference loading to get rid of coverage bugs