orphan images bug fix