Handling tmp port locks improved.