fixed getkeyboard and getbox functions