Bug fixing removing redundant steps