Merged Benja's changes