fixed some bugs related to non-default locations