Fixed issue with thread freeze in arduino stub