Fix for efficiency issues
Merge remote-tracking branch 'upstream/master'