Prevent srt.detect call from throwing index error