Keep method visibility

This change makes Mem to keep method visibility.