fixed bug in pattern view selection