Fix subclassing

Should fix #34