optimization-fixes