Revert changes to lib until it works on 7 and 8