Fixed undefined stack_name problem in apis module