added plugins_loaded hook to fix ticket #12