Pull request for Issue665

@dretrex 
@davidChevrier 
Should this be a const function?