bugfix - closes #49