implmented final (I hope) version of fix
(#563)
trimmed docstring
(#563)