fixing image rendering issue