Consider throwing exception for erroneous case.