fix expand pattern