capture image enhance and bug fix