Restoring Dan's changes that were lost during the merge