some minor conditional optimization