Fix for #13

Fix for #13 . I will do some clean up.