now supporting 5.3 (down from 5.4 only), fixed rewrite issues