fixed filename bug and maybe image slice bug