trying to fix conversion to bitmap