context manager for cursor not working!