Fixed bug that made it not work in a specific directory.