Fix undefined variable 'singlePoint'