Minor changes to fix broken code