fixed critical bug with optimizing the logistic layer; feeforward before optimize allows for an always synced input layer