Fixed a small bug with expand.

Also documentations update. Version bump