fix compare flags, add proper implementation for provides