another couple minor performance optimizations