Fixed some bugs that will hurt loc