fix a bug introduced in v0.9.1 where memory threshold would be set to 0 if trim threshold was 0