FIX: order of sources and libraries matters