Better error message in dynamics