A compound for use in treating a lysosomal storage disease in a subject diagnosed as having said disease, comprising administering to the subject an effective amount of the compound, and optionally further comprising the step of administering to the subject a therapeutically effective amount of a lysosomal enzyme, wherein the compound is represented by the following structural formula, or a pharmaceutically acceptable salt thereof, wherein: n is 1 or 2; m is 1; p is 1; t is 0 or 1; y is 1; z is 0 or 1; E is O; X 1 is CR 1; X 2 is O; X 3 is -NH; X 4 is a direct bond or CR 4 R 5; X 5 is a direct bond or O; R 1 is H or (C 1 -C 6)alkyl; R 4 and R 5 are independently selected from (C 1 -C 6)alkyl, or taken together with the carbon to which they are attached form a spiro (C 3 -C 10)cycloalkyl ring; R 6 is -H or (C 1 -C 6)alkyl; A 1 is (C 6 -C 12)aryl or (C 2 -C 9)heteroaryl, optionally substituted with one or more substituents selected from the group consisting of: halo; (C 1 -C 6)alkyl optionally substituted by one to three halo; (C 1 -C 6)alkoxy; and -OH; and A 2 is (C 6 -C 12)aryl or (C 2 -C 9)heteroaryl, substituted with one or more substituents selected from the group consisting of: (C 2 -C 9)heterocycloalkyl; R 8 R 9 N-CO- wherein R 8 and R 9 are each independently selected from the group consisting of hydrogen and (C 1 -C 6)alkyl or R 8 and R 9 can be taken together with the nitrogen to which they are attached to form a (C 2 -C 9)heterocycloalkyl group optionally substituted by one to three halo groups; (C 1 -C 6)alkylsulfonyl optionally substituted by one or two groups selected from (C 1 -C 6)alkoxy and (C 3 -C 10)cycloalkyl; (C 1 -C 6)alkyl substituted by one to four substituents selected from the group consisting of hydroxy, (C 1 -C 6)alkoxy, (C 1 -C 6)alkoxy(C 1 -C 6)alkoxy, (C 2 -C 9)heterocycloalkyl, and (C 2 -C 9)heteroaryl; and (C 1 -C 6)alkyloxy substituted by one to four substituents selected from the group consisting of cyano, (C 1 -C 6)alkoxy, (C 2 -C 9)heterocycloalkyl, and (C 2 -C 9)heteroaryl. n is 1 or 2; m is 1; p is 1; t is 0 or 1; y is 1; z is 0 or 1; E is O; X 1 is CR 1; X 2 is O; X 3 is -NH; X 4 is a direct bond or CR 4 R 5; X 5 is a direct bond or O; R 1 is H or (C 1 -C 6)alkyl; R 4 and R 5 are independently selected from (C 1 -C 6)alkyl, or taken together with the carbon to which they are attached form a spiro (C 3 -C 10)cycloalkyl ring; R 6 is -H or (C 1 -C 6)alkyl; A 1 is (C 6 -C 12)aryl or (C 2 -C 9)heteroaryl, optionally substituted with one or more substituents selected from the group consisting of: halo; (C 1 -C 6)alkyl optionally substituted by one to three halo; (C 1 -C 6)alkoxy; and -OH; and A 2 is (C 6 -C 12)aryl or (C 2 -C 9)heteroaryl, substituted with one or more substituents selected from the group consisting of: (C 2 -C 9)heterocycloalkyl; R 8 R 9 N-CO- wherein R 8 and R 9 are each independently selected from the group consisting of hydrogen and (C 1 -C 6)alkyl or R 8 and R 9 can be taken together with the nitrogen to which they are attached to form a (C 2 -C 9)heterocycloalkyl group optionally substituted by one to three halo groups; (C 1 -C 6)alkylsulfonyl optionally substituted by one or two groups selected from (C 1 -C 6)alkoxy and (C 3 -C 10)cycloalkyl; (C 1 -C 6)alkyl substituted by one to four substituents selected from the group consisting of hydroxy, (C 1 -C 6)alkoxy, (C 1 -C 6)alkoxy(C 1 -C 6)alkoxy, (C 2 -C 9)heterocycloalkyl, and (C 2 -C 9)heteroaryl; and (C 1 -C 6)alkyloxy substituted by one to four substituents selected from the group consisting of cyano, (C 1 -C 6)alkoxy, (C 2 -C 9)heterocycloalkyl, and (C 2 -C 9)heteroaryl.