Prevent unnecessary attribute access

Issue #12