fixed an error when having empy entries