Compile pattern before checking

Sorry, I was thinking about line 60