multiple fixes for PNG rendering