Fix bug when referencing limits