Fixed the problem with not redirecting to fail.php when  is 0