Fixed undefied issue