Fixed the function name extraction when there are no class