fix for crash on empty problems