fixed: bug on completion of a lensthread not capturing the end signal.
updated: sample app for threads cleaned and updated.