Last bugfix for Issue #319

Same fix applied as for issue #316