Debugged undefined offset 49 and added index.php