Fix a Bug in the end-element when no gap should be used.