Fixed 'apply' bug, Final HW3