Fixed <<undefined>> error