minor changes to correct bug