Fixed error compiling mode on-demand