Merge branch 'V5-4-patches' into V5-5-patches

* V5-4-patches:
  Added checks for printing variables with wrong types.