fixes #279 fixes #281 fixes #283