Fix many bugs
Merge pull request #25 from MilloLab/0.4

Fix many bugs