Fixed bug which caused the last applied event to be applied again upon build.