Fixed problem with line minimiser