Fixed bugs! Works now!