Change the way the 'OPTIONAL MATCH' has to be generated