Raise error fixed; unreferenced var removed