fixed spec nil issue