proposed fixes for issues #12 #14