fixed bug of max(int, double)