Fix use of moment function