[fix] preform the resize hack when document is ready only
[clean] tweaks for the integration of profile