Remove $directory from the parameters.