fixed #1 - threaded perl behavior