Fixed apply bug