Forgot to save after I fixed the bug, so this is the real bug fix