some fixes for IDEA 13 compatibility.