Added check for edge case.