Some changes to fix one bug