Added custom space handling