Merged in Adri's changes