Made compiling more robust