added flag to enable or disable custom location setting