Fixed unreferenced variable warning
Fixed long to float conversion warning