replaced session name fixing with regex