Fixed bug for capturing.