fixes bugs
Merge branch 'master' of https://github.com/adrelino/cuda_ss14