corrected access logic