Fix bug when matching with empty ability list