some fixes for support php 5.3 and not rewrite options