fixed invalid const reference