Resolved some const reference issues