working on fixing material bug