Minor optimiziations