bug fix for main entry points