Fix bug where crash would happen if the first token would be removed

This commit fixes a small bug that only causes problems when the first element is removed from a chain.