Fixing spacing bug for ST_REFERENCE