Restoring Thomas' changes