fixes build problems (librarires are now linked properly)