More changes to fix bug