Fixed the unbound variable error.