fix nil params issue