Corrected behavior in case of empty input. Only one failed test case left to solve.