NaN fix for android