Fixed problem with reading local patterns.