BK condition, rank condition not verified

I am trying to replicate the results of these two pdfs. These are baseline RBC models and one with adjustment cost. I am getting the error of B_K condition not verified. I cannot figure out what is the issue here. Any help with be greatly appreciated.

rbc_baseline.mod (831 Bytes)
rbc_adjustment_cost.mod (995 Bytes)

Here are the pdfs:

From rbc_baseline.mod and rbc_adjustment_cost.mod, the model diagnostics warn that:

MODEL_DIAGNOSTICS: The following endogenous variables aren't present at the current period in the model:

Then you should check in the model equations how does the model know r in t. You can check these model diagnostics placing the command model_diagnostics; after the steady; command.