Fix bugs with compiling using monolite