Fix bugs with closing and opening handles