Moved $limits_expr to start of select statement