More fixes from SNAP source tree