Fixed routine call bugs.