fixed apply bug