Bug fix handling inner statement function declaration