fixing bugs and roll back on wedcs