set slash if necessary in constructor