Cleanup: Fix bug where we could pop from an empty list