some bugfix and improvements for LCD1602