fixing image codes