Fixed CUDA warnings and errors, #43