fixed compile error, removed obsolete variable