fix image generator

Related to #424