fix 500 on bad thread id input