Fixed kwargs pop issue