Port fixes #8