Added parameter checking and small fixes
Added parameter checking and small fixes

Jekub/Wapiti,yanqingmen/Wapiti,yanqingmen/Wapiti,Neseb/wapiti,yanqingmen/Wapiti,yanqingmen/Wapiti,Neseb/wapiti,Jekub/Wapiti,yanqingmen/Wapiti