fixed bug in factory event