fix missed end