fix ref
uncomment detach
detach and free pages when done