added some robustness to non-compiling code