fix block removing on prev elements ended