Your problem might be related to the various capital stocks in the model and to what is actually predetermined, see [Timing of capital in two sector economy)
Your problem might be related to the various capital stocks in the model and to what is actually predetermined, see [Timing of capital in two sector economy)