Fix bug expand()