fix incorrect cast
Merge pull request #425 from 9rnsr/fixRightThis

Fix right this check