fixed all pedantic/conversion warnings from gcc