Execute close procedure only once. Closes #183.