double to float cast warning fix