Adding Elliot's fixes