Bugfix: die message got hidden because $res is undef or scalar