Fix #428 - Added safety check.