improved waiver, fixes #4