Bug fixing in lock and test
Merge branch 'master' of github.com:jsfr/PCSD-2013