Fix the problem in notify

This is an ugly way to solve the problem, need a better way to do it.
See #1.