fixed bugs. changed bw save image type