Added in more checking for defined symbols.