Some fixes for problems that occurred after switching local directory