fix inheritance for protected/private methods