Fix isFirst declaration