small changes and a simple fix for #3