change min to fmin, fixes compiling