Fix ability calculation error