added testing for captures, and fixed bugs resulting from those tests