Added FIXME-note and attempted to workaround the problem
Added another check for existence of material parameter