fixed warning to show up about undefined variable  when debug turned on @mats