added logic to handle seeking before first song and after last song