fixes syntax error in limit check