Fixed error when not providing $_POST['data']