minor perf improvements