Minor refactoring
Handle the case where the query contains multiple colons