corrected bug in CaptureController

$request not defined. Changed to use getRequest()