quotes fixed, still doesn't detect REFSAME when it should