Rank Condition in a model with Working Capital

Hello,
I am going to analyze the effect of working capital in the interaction of real and financial sectors. The agents and their activities are:
1- Homogeneous households decide about consumption and supply the production input to firms and deposits to banks. They are also the owner of firms and banks.
2- Competitive firms produce final goods and demand production input from households and loan from banks. They need working capital loans, a fraction of their production cost, to start production.
3- Competitive banks demand deposit from households and supply loan to firms.

To learn the different mechanisms, I change the production input from labor to capital in two sets of models.
I could simulate the model when production function is labor(NBindingLabor.mod), but I cannot simulate the model with capital as production input (NBindingCapital.mod).

I have failed to get an answer for NBindingCapital by changing the calibrated values in nested loops, which were written to find a combination of parameters that can solve the model; there were always some problem with Blanchard and Kahn condition. It is worth to mentioning that there are many sets of calibrated parameters that Blanchard and Kahn condition is satisfied (number of forward looking variables are equal to the number of eigenvalues greater than one), but rank condition is not satisfied. The related errors are:
Blanchard Kahn conditions are not satisfied: no stable equilibrium.
Blanchard Kahn conditions are not satisfied: indeterminacy due to rank failure.

I have attached my Dynare codes. Would any body please help me?
NBindingCapital.mod (3.25 KB)
NBindingLabor.mod (2.75 KB)