Fixed to-buffered-image (dorun); some optimizations