Experiencing type conversion error. Long to double