fix capabilities bugs plus add tostring