resizing image
fixing some small bug