Fixed a bug with handlers not added.