Fix extends and added test