flat material
some bug fixes