Some changes to solve #1.