fixed inheritance js