small performance improvements.