Minor changes to get it to work