fixes #22
fixes #23
fixes #24