auto-select the first non-hidden period

fixes issue #8