Tests, fixes #4