Fixed compiler warnings due to type incorrectness