Fix a bug in nextGet