fixing errant end