Fixed bug, runs smoothly now.