fixing cap errors