removed error causing foreach