Fixed a bug in the code where using the char "/" screws up the memory