added changes from marcel again.
fixed run error caused by modified function name in Compat.java