fixed counter
updated build scripts