moved post(DEBUG); inside the if block