resolved bug from LocationoByCode method