Fixed freeze problem