autopatcher and optimize working properly