fixed the capture bug