Fixed broken handler logic.