remove bugs & add image scaling