Fixed version 1 bug
again
merged bug fix to ver2