fixed the undefined issue...