fixing -null- in resulting thumbnail image