Nil boundary fix