Fixing the path handling and handling the path better