Fixed some issues where localmode didnt work