Optimized kso_images, some fixes