Fix version in if-statement

And I think self table is redundant