Fix goto force problem and rename some functions