Make pattern loading work on IE10.

also braces fixed