bug fixes related to handlers