Small changes to make this work for me

You should probably review carefully and test before accepting!