fix image sticking out beyond width (re #366)