fixed undefined param issue