Fixed cartpage bug and added data validation