Fixing encapsulation problems