Adds fix for querys with spaces