Fixed negtive clock values and build.sh script