Fix damage cap check, which was spewing lots of errors