deletes orphan images
bug fixes