Input library bugfixes