Index page fixed code bugs, works fine now