fixes #274 fixes #267