this causes problems because you did not check if target was null