Added one last case scenario, now it really does work on all cases.