Fix bug when extending kwargs