Fixes compilation with libraries, runs on device