Fix capturing image