Small improvements

Small fixes to the logic + cosmetic UI improvement.