Clean up cursor during initialization