fix property access and small cleanup