Fixed small issues in arduino sketch