Fix index error in getSlab