Fixing spacing issues with ST_CURLY_OPEN and variables