Fixed scoping bug in handleSeek method