Now fixed the freezing bug.