fixes thumbnail on nsfw images, adds test program