Fixed minor bug causing unclosed element

Signed-off-by: Elliot Condon <e@elliotcondon.com>