Fixed issues around inheritence