fixes #1; defined an order of handler execution