added missing tests and fixed code for using .off() without handler function