fixed a terminating block error