Fixed loop bug in page action