fixed gcc-warning and added new test