Fixed a bug - issue#5

issue#5 is a bug, which is fixed by this patches.