Hopefully fixes NaN issue