Minor peformance improvements