Added some mode hooks