undefined state issue and shashank issue