Rewrite function that check if theme is compatible.

There was little error and function was little confusing...