Fixed $_GET['r'] per thiswayup's comment