Use current-session if it is not specified directly.