fixed: catch the err