fixes #13
fixes #31 (not sure if this change fixed it but it seems fixed)
minor changes