Tag closer fix

Fix for #686