Fixing bug caused by box names with spaces