fixed unsigned integer warnings
fixed mbforeach warnings
fixed hidekeyboard warnings