small hack for image handling on mac os