fixed image handling
merged