Fixing some library problems