#1079 Fixing loadThreadById function