Thanks for @davidflanagan 's advice. So, I updated code as above to make sure width and border are integer.