Fixed the bug. Working now.