The posterior mode lies outside the prior bounds

I get the following error when I run estimation:

??? Error using ==> metropolis at 113
MH: The posterior mode lies outside the prior bounds.

Error in ==> dynare_estimation at 778

Error in ==> monetary_friction at 283

Error in ==> dynare at 26
evalin(‘base’,fname) ;

The posterior modes, as far as I can tell, are all in the bounds; there might be a few that are on the bounds, but they are from a uniform distribution so it shouldn’t be a problem. This error does not show up when I use csminwel as my minimization routine. Any ideas?

Thanks in advance!