fix block ending