fixing delibrate bugs by waleed :D