fixing bugs in build process and thumbnail