change order to allow access of $.terminal.active() in prompt