This should fix issue #6
Little code cleanup