fixed duplicate image and incorrect dimension issue