Fixes invalid cap statement