Fix bug with inheritance and use of .end not comforming to the right interface