some image bug fixes