Rename apply to close. Fixes #325