fix invalid end component error - fix #86

An old error - now fixed (!)