It would appear as though your problem is too complicated to solve with this simple algorithm. Please contact your system manager or service engineer.