fixed standard error calculation