Fixed bugs on order prepairing and validation