fixed empty array and map bug. optimize catch exception.