fix metrics not reporting on client submit
fix variable not found and missing result return
whitespace fixes