Got rid of compiler warnings by making type safe changes