added support for close frames, fixes #14