added inline patch detection