Fixed a threading issue outside eclipse.