Fixed twice defined constant and has_cap deprecated message