fixing arrays and now namespace is set only once