changes to fix bug