Added a logical fix, thanks David B!