fixed casting warning