Added check for artifact objects. Small memory leak