fixes for getAddresses ajax call