Fixing bug with single quotes around ref name