Fixed build script for snapshots