fixed test and warnings