compiler warnings fixed as well as new test case added