Fix wrong inheritance issue