Fixed (hopefully) undefined value issue.