fixes for firefox, image rendering