Bug fixing
merged version