Fix invisible logic to compile

Oops, broke compiling when reworking Tobias' patch a little.