Fixed various bugs in product scheduling
Various changes