fix eception on inherit classes