fix for storing images in sqlite