fix nan issue maybe?