Fix bugs that prevented qcuke from working.