Fixed the nil slice issue