patched compile errors