Added pending signals code