Fix capture bug