Fix #6: patch sys after thread