Add missing libraries
Remove duplicate flag, also set incorrectly