Removed an unused variable and fixed a bug.