fixes #309, 308