Simplify the implementation for edge case.