Now corrected for shared libraries